{% extends 'wbfx.html' %}

{% block content %}
    <div>

        <form class="form-horizontal row bg" role="form" action="#">
            <h3 style="margin-left: 30%">个人信息：</h3>
            <br>
            <h3 style="margin-left: 30%;color: chocolate">{{ flag }}</h3>
            <div class="form-group" style="margin-top: 5%">
                <label for="account" class="col-sm-4 control-label">用户名</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" name="username" value="{{ username }}"
                           readonly="readonly">
                </div>
            </div>
            <div class="form-group">
                <label for="email" class="col-sm-4 control-label">邮箱</label>
                <div class="col-sm-5">
                    <input type="email" class="form-control" name="email" value="{{ UserEmail }}"
                           readonly="readonly">
                </div>
            </div>
        </form>
    </div>


    <a data-toggle="modal" data-target="#myModal">
        <button class="btn" style="margin-left: 69%">修改个人信息</button>
    </a>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button data-dismiss="modal" class="close" type="button"><span
                            aria-hidden="true">×</span><span class="sr-only">Close</span>
                    </button>
                    <h4 class="modal-title">修改个人信息</h4>
                </div>
                <div class="modal-body">
                    <div class="">
                        <form class="form-horizontal row bg" role="form" action="/myinfo/"
                              method="post">

                            <div class="form-group">
                                <label for="account" class="col-sm-4 control-label">用户名</label>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" name="UserName" value="{{ username }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-sm-4 control-label">邮箱</label>
                                <div class="col-sm-5">
                                    <input type="email" class="form-control" name="UserEmail" value="{{ UserEmail }}">
                                </div>
                            </div>


                            <div class="form-group">
                                <label for="password1" class="col-sm-4 control-label">密码</label>
                                <div class="col-sm-5">
                                    <input type="password" class="form-control" name="UserPassWord1">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="confirm_password" class="col-sm-4 control-label">确认密码</label>
                                <div class="col-sm-5">
                                    <input type="password" class="form-control" name="UserPassWord2">
                                </div>
                            </div>

                                  <div class="form-group">
                                    <div class="col-sm-offset-7 col-sm-5">
                                        <button type="submit" class="btn-success">确定</button>
                                    </div>
                                </div>
                        </form>
                    </div>
                </div>
                <div class="modal-footer">
                    <button data-dismiss="modal" class="btn btn-default" type="button"
                            onclick="">关闭
                    </button>
                </div>
            </div>
        </div>
    </div>

{% endblock %}